﻿Imports Mystery
Imports System.Reflection

Public Class UserInterfaceRegistration
    Implements IRegistrationActor

    Public Sub act() Implements Mystery.IRegistrationActor.act

        'getMystery.AssemblyRegister.addAttributeToClass(Of ContentTypeButtonAttribute, User)(New ContentTypeButtonAttribute With {.normal_icon = "/MysteryControls;component/Images/users.png"})
        'getMystery.AssemblyRegister.addAttributeToClass(Of ContentButtonAttribute, User)(New ContentButtonAttribute With {.normal_icon = "/MysteryControls;component/Images/users.png"})
        'getMystery.AssemblyRegister.addAttributeToClass(Of ContentButtonAddAttribute, User)()

        Dim username As PropertyInfo = GetType(User).GetProperty("username")
        getMystery.AssemblyRegister.addAttributeToProperty(Of ContentProperyViewAttr)(username)
        getMystery.AssemblyRegister.addAttributeToProperty(Of ContentPropertyAddAttr)(username)

        Dim fullname As PropertyInfo = GetType(User).GetProperty("fullname")
        getMystery.AssemblyRegister.addAttributeToProperty(Of ContentProperyViewAttr)(fullname)
        getMystery.AssemblyRegister.addAttributeToProperty(Of ContentPropertyAddAttr)(fullname)

        Dim password As PropertyInfo = GetType(User).GetProperty("password")
        getMystery.AssemblyRegister.addAttributeToProperty(Of ContentProperyViewAttr)(password, New ContentProperyViewAttr With {.implementing_type = GetType(passwordControl)})
        getMystery.AssemblyRegister.addAttributeToProperty(Of ContentPropertyAddAttr)(password, New ContentPropertyAddAttr With {.implementing_type = GetType(PassWordInAdd)})

        Dim display As PropertyInfo = GetType(User).GetProperty("display")
        getMystery.AssemblyRegister.addAttributeToProperty(Of ReferenceText)(display)


    End Sub
End Class